CREATE TABLE jms_dm.dm_end_dispatch_third_loss_detail_dt (
    res_network_code1 varchar(30) NULL COMMENT "责任网点code1",
    res_network_code2 varchar(30) NULL COMMENT "责任网点code2",
    res_network_code3 varchar(30) NULL COMMENT "责任网点code3",
    waybill_no varchar(50) NULL COMMENT "运单号",
    taking_time datetime NULL COMMENT "揽收时间",
    collect_in_time datetime NULL COMMENT "入库时间",
    create_time datetime NULL COMMENT "申报时间",
    closing_time datetime NULL COMMENT "结案时间",
    exception_desc varchar(500) NULL COMMENT "异常说明",
    res_network_name1 varchar(120) NULL COMMENT "责任网点name1",
    res_agent_code1 varchar(30) NULL COMMENT "责任网点所属代理区code1",
    res_agent_name1 varchar(120) NULL COMMENT "责任网点所属代理区name1",
    res_fran_code1 varchar(30) NULL COMMENT "责任网点1所属加盟商code",
    res_fran_name1 varchar(120) NULL COMMENT "责任网点1所属加盟商name",
    res_virt_code1 varchar(30) NULL COMMENT "责任网点1所属虚拟代理区code",
    res_virt_name1 varchar(120) NULL COMMENT "责任网点1所属虚拟代理区name",
    res_network_name2 varchar(120) NULL COMMENT "责任网点name2",
    res_agent_code2 varchar(30) NULL COMMENT "责任网点所属代理区code2",
    res_agent_name2 varchar(120) NULL COMMENT "责任网点所属代理区name2",
    res_fran_code2 varchar(30) NULL COMMENT "责任网点2所属加盟商code",
    res_fran_name2 varchar(120) NULL COMMENT "责任网点2所属加盟商name",
    res_virt_code2 varchar(30) NULL COMMENT "责任网点2所属虚拟代理区code",
    res_virt_name2 varchar(120) NULL COMMENT "责任网点2所属虚拟代理区name",
    res_network_name3 varchar(120) NULL COMMENT "责任网点name3",
    res_agent_code3 varchar(30) NULL COMMENT "责任网点所属代理区code3",
    res_agent_name3 varchar(120) NULL COMMENT "责任网点所属代理区name3",
    res_fran_code3 varchar(30) NULL COMMENT "责任网点3所属加盟商code",
    res_fran_name3 varchar(120) NULL COMMENT "责任网点3所属加盟商name",
    res_virt_code3 varchar(30) NULL COMMENT "责任网点3所属虚拟代理区code",
    res_virt_name3 varchar(120) NULL COMMENT "责任网点3所属虚拟代理区name",
    res_network_code4 varchar(30) NULL COMMENT "责任网点code4",
    res_network_name4 varchar(120) NULL COMMENT "责任网点name4",
    res_agent_code4 varchar(30) NULL COMMENT "责任网点所属代理区code4",
    res_agent_name4 varchar(120) NULL COMMENT "责任网点所属代理区name4",
    res_fran_code4 varchar(30) NULL COMMENT "责任网点4所属加盟商code",
    res_fran_name4 varchar(120) NULL COMMENT "责任网点4所属加盟商name",
    res_virt_code4 varchar(30) NULL COMMENT "责任网点4所属虚拟代理区code",
    res_virt_name4 varchar(120) NULL COMMENT "责任网点4所属虚拟代理区name",
    res_network_code5 varchar(30) NULL COMMENT "责任网点code5",
    res_network_name5 varchar(120) NULL COMMENT "责任网点name5",
    res_agent_code5 varchar(30) NULL COMMENT "责任网点所属代理区code5",
    res_agent_name5 varchar(120) NULL COMMENT "责任网点所属代理区name5",
    res_fran_code5 varchar(30) NULL COMMENT "责任网点5所属加盟商code",
    res_fran_name5 varchar(120) NULL COMMENT "责任网点5所属加盟商name",
    res_virt_code5 varchar(30) NULL COMMENT "责任网点5所属虚拟代理区code",
    res_virt_name5 varchar(120) NULL COMMENT "责任网点5所属虚拟代理区name",
    award_amount_total decimal(22, 2) NULL COMMENT "合计裁定金额",
    store_code varchar(50) NULL COMMENT "门店code",
    store_name varchar(120) NULL COMMENT "门店名称",
    business_id varchar(50) NULL COMMENT "门店品牌code",
    business_name varchar(120) NULL COMMENT "门店名称",
    date_time date NULL COMMENT "doris分区字段",
    res_network_amount1 decimal(22, 2) NULL COMMENT "责任网点1赔付金额",
    res_network_amount2 decimal(22, 2) NULL COMMENT "责任网点2赔付金额",
    res_network_amount3 decimal(22, 2) NULL COMMENT "责任网点3赔付金额",
    res_network_amount4 decimal(22, 2) NULL COMMENT "责任网点4赔付金额",
    res_network_amount5 decimal(22, 2) NULL COMMENT "责任网点5赔付金额",
    network_count int(11) NULL COMMENT "责任网点数"
) ENGINE=OLAP 
DUPLICATE KEY(res_network_code1, res_network_code2, res_network_code3)
COMMENT "三方遗失明细"
PARTITION BY RANGE (date_time) ( 
   START ("2023-04-01") END ("2023-04-30") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(site_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-186",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);